import java.util.Scanner;

public class Page_96_8 {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int n = num.nextInt();
        int arr[][] = new int[n][n];

        int i,j;
        for(i = 0;i < n;i++)
        {
            for(j = 0;j <= i;j++)
            {
                if(i == j)
                {
                    arr[i][j] = 1;
                }
                arr[i][0] = 1;
                if(i > 0 && j > 0 && j < i)
                {
                    arr[i][j] = arr[i-1][j]+arr[i-1][j-1];
                }
            }
        }
        for(i = 0;i < n;i++)
        {


            for(j = 0;j<n-i-1;j++)
            {
                System.out.printf("  ");
            }
            for(j = 0;j <= i;j++)
            {
                System.out.printf("%4d ",arr[i][j]);
            }
            System.out.println();
        }
    }
}
